﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Automobile.service.Model;
using Automobile.service.BLL;
namespace Automobile.service.UI.Handler
{
    /// <summary>
    /// HandlerIntoList 的摘要说明
    /// </summary>
    public class HandlerIntoList : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            PurchaseBLL bll = new PurchaseBLL();
            context.Response.ContentType = "text/plain";
            Purchase p = new Purchase();
            p.Supplier_Id = Convert.ToInt32(context.Request["Supplier_Id"]);
            p.WareHose_Id = Convert.ToInt32(context.Request["WareHose_Id"]);
            p.Employee_Id = Convert.ToInt32(context.Request["Employee_Id"]);
            p.SumMoney = Convert.ToInt32(context.Request["SumMoney"]);
            p.Purchase_State = 0;
            p.PurChase_InOut = "采购";
            p.Purchase_curom = context.Request["Purchase_curom"];
            string xml = context.Server.UrlDecode(context.Request.Form["xml"].ToString());  //xml解码
            context.Response.Write(bll.Purchase_IntoList(p,xml));


        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}